package Computer.Event;
import Computer.Main.*;

public class Print implements Instruction {

	private Pointer ptr;
	
	public Print(Pointer ptr) {
		this.ptr = ptr;
	}
	
	@Override
	public void execute(Memory memory, ProgramCounter counter) {
		System.out.println(ptr.getWord(memory));
		counter.increment();
	}
	
	public String toString() {
		return "PRT " + ptr;
	}

}
